﻿using codeparser.net.v2.Entities;

using System;

namespace codeparser.net.v2.Lexer
{
    /// <summary>
    /// Represents the state left bracket.
    /// </summary>
    internal class StateLeftBracket : StateBase
    {
        /// <summary>
        /// Processes a left bracket.
        /// </summary>
        /// <param name="lexer">The lexer.</param>
        internal override void ProcessLeftBracket(Lexer lexer)
        {
            lexer.CurrentState = new StateText();
        }

        /// <summary>
        /// Processes a character.
        /// </summary>
        /// <param name="lexer">The lexer.</param>
        internal override void ProcessCharacter(Lexer lexer)
        {
            lexer.CurrentState = new StateElement();
        }

        /// <summary>
        /// Gets the token type.
        /// </summary>
        /// <value>The token type.</value>
        internal override TokenType TokenType
        {
            get
            {
                return TokenType.LeftBracket;
            }
        }
    }
}